#ifndef STARTWINDOW_H
#define STARTWINDOW_H
#include <QMainWindow>
#include <QVector>
#include <QPair>

class QLabel;
class QPushButton;
class QMediaPlayer;
class QAudioOutput;

class StartWindow : public QMainWindow {
    Q_OBJECT

public:
    explicit StartWindow(QWidget *parent = nullptr);
    ~StartWindow();
    void startGame();
signals:
    void startGameRequested(int characterIndex);

private slots:
    void prevCharacter();
    void nextCharacter();

private:
    void updateCharacterDisplay();
    void validateResources();
    void setBackground();

    // 常量定义
    const int MAX_CHARACTERS = 2; // 明确角色数量
    int currentCharIndex = 0;

    // 角色资源存储
    QVector<QPair<QString, QString>> characters;

    // UI组件
    QLabel *charImageLabel;
    QPushButton *prevBtn;
    QPushButton *nextBtn;
    QPushButton *startButton;

    // 音频组件
    QMediaPlayer *backgroundMusic;
    QAudioOutput *backgroundOutput;
};

#endif // STARTWINDOW_H
